home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard British (B-1.2.2) / More Stacks / Help / Help / card_68799.txt < prev    next >
Text File  |  1988-02-18  |  2KB  |  110 lines

  1. -- card: 68799 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4745
  5. -- name: 
  6. ----- HyperTalk script -----
  7. On Closecard
  8.   hide card field 1
  9. end closecard
  10.  
  11.  
  12. -- part 4 (field)
  13. -- low flags: 81
  14. -- high flags: 2004
  15. -- rect: left=276 top=65 right=170 bottom=452
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 0
  19. -- font id: 2
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: 
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   hide card field 1
  27. end mouseUp
  28.  
  29.  
  30. -- part 5 (button)
  31. -- low flags: 00
  32. -- high flags: 8004
  33. -- rect: left=332 top=235 right=257 bottom=399
  34. -- title width / last selected line: 0
  35. -- icon id / first selected line: 0 / 0
  36. -- text alignment: 1
  37. -- font id: 0
  38. -- text size: 12
  39. -- style flags: 0
  40. -- line height: 16
  41. -- part name: Example
  42. ----- HyperTalk script -----
  43. on mouseUp
  44.   --An example of an IF THEN ELSE control structure
  45.   If the shiftKey is down then
  46.     Play "boing"
  47.     put empty
  48.   else
  49.     Play "boing" c5 c
  50.     put "the shift key is up"
  51.   end if
  52.   edit script of card button "example"   --so you can see the script
  53. end mouseUp
  54.  
  55.  
  56.  
  57. -- part 9 (button)
  58. -- low flags: 00
  59. -- high flags: 0001
  60. -- rect: left=206 top=297 right=320 bottom=244
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 1
  64. -- font id: 0
  65. -- text size: 12
  66. -- style flags: 0
  67. -- line height: 16
  68. -- part name: 
  69.  
  70.  
  71. -- part contents for background part 1
  72. ----- text -----
  73. Once HyperCard finds a handler for the message sent and begins performing the commands in a script, those commands are carried out sequentially from first to last.  You can modify the order or pass control using five control structures: If, Repeat, Exit, Send and Pass.
  74.  
  75. If <true or false expression> then
  76.      <command>
  77.      <command>
  78. else
  79.      <command>
  80.      <command>
  81. end if
  82.  
  83.  
  84. -- part contents for background part 2
  85. ----- text -----
  86. Control structures (1)
  87.  
  88. -- part contents for background part 44
  89. ----- text -----
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. if...then
  97.  
  98.  
  99. else
  100.  
  101.  
  102. end if
  103.  
  104. -- part contents for background part 43
  105. ----- text -----
  106. 267,189
  107.  
  108. -- part contents for card part 4
  109. ----- text -----
  110. An expression is a piece of HyperTalk that has a value.  In this example, the result of the expression must be either true or false.